Added cross-platform compatibility and changed working directory for terminal