Fix ofFileUtils for Win32

* Use for instead of while
* Fix error message
* Improve removeTrailingSlash() for Win32
* Fix return empty