Fix bashisms/shebang lines; add ruby gem to $PATH