fixed some bash pitfalls, got rid of depricated .sh
Merge pull request #2 from arthurdent/master

fixed some bash pitfalls, got rid of depricated .sh