"bm open" now works in linux and cygwin

Most of the script runs fine in linux and cygwin except open. This pull request fixes that.