Converting shell scripts into python scripts for better compatibility with other OS

Resolves #39