osx support

Hi,

Great script. I ran it on OSX and two things jumped out, so I fixed them. First my system Perl is 5.12, though I have 5.14 installed through Homebrew, so I changed the shebang to check `$PATH`. Also on OSX it is `stty -f`, not `stty -F`, so I added a switch for that.

Cheers,
Alex