File Helper: use faster Directory Iterator, and now remove hidden files

The previous version of this method would not remove hidden files (like .DS_Store) and would warn when rmdir() would try and remove the directory because files still existed.

The new method removes all hidden files, I tested on the following PHP versions:
- 5.2.17
- 5.3.20
- 5.4.10

I had to add some fallback code for php 5.2,