No, this is not the explanation. 
Charge is only transferred by touching respectively rubbing. To be transferred by air, it should be far more stronger.
The foil and the plastic would also repel each other, if the charge was transferred. If the plastic transferred a part of its charge, both of the two objects would be charged identically.
By rubbing the plastic object has been charged negatively. So it repels the negatice charges within the foil. Due to the reason that the plastic is above the electroscope, its negative charges gather in its legs. Since now both of the two legs are charged negatively, the repel each other, because identical charges repel each other.
| Roll your mouse over the picture to bring the plastic rod closer to the foil. Pay attention to the way the charges are redestributed. This process is called induction. Think about how this effect would affect the water. |  | 
Now try by yourself to deflect a water jet. Open the tap only until there is a thin water jet. Now move a rod which has been rubbed against wool, towards the water jet and test how strongly you can deflect the water jet.
 
