Remove use of deprecated getopts.pl in newer perl versions. Allows for
execution under SLES12. Moved command-line help to a separate
subroutine while I was at it and updated the -w logic slightly to
behave more intuitively. Closes #60.