Removed POSIX assumptions
Added missing quotes
Fixed arguments bug under windows

Also directed the output to the console, to make problems easier to diagnose.
Sent stderr to console.debug instead of log
Cleaned up the code a bit
Removed logging.
Merge pull request #3 from abe545/master

Added windows support (without breaking POSIX) fixes #2