Allow readline that doesn't support -f

* OSX's readline doesn't support -f. Default to current shell argument
  to allow script to continue.
* Added set -e to ensure any command that fails aborts script.