Bugfix/infinite loop in file system copy dir

This came up since our Robo tasks are used in multiple projects.
One project did not have one of the directories to be copied.
The while loop never ended and killed our CI server with "no space left on device" ;)

From my perspective, throwing an Exception is reasonable (instead of simply emit a warning and go on), since if you want to copy a directory in a Task and it cannot be opened (whether it be because the directory does not exist or access rights problems), this denotes a problem.

In our generic tasks, we will check for the existance of the directory ourselves.

(the second commit makes the code PSR-2 compliant).