fix bugs in executable

I wouldn't expect this to work on Windows. You should be able to find the current operating system's file path separator somewhere.