Cross platform compatibility

I added some cross platform compatibility (suggested in #1) and have tested this successfully on linux (ubtuntu 13.10) and mac (os x 10.9). (Unfortunatly I do not have a windows machine available. )

Also, I added the option to run the terminal process in the directory which was quite useful for linux.