Fixes and cleanups

Avoid modified UTF-8 pitfalls on OSX and Linux
Prevent memory corruption on OSX when kernel drops events (seen after 40+ days uptime)
Pass FSEvents flags to listener
Remove unused code
Cleanup whitspaces