Rework option parsing to not break

This is a proposed fix for #3, but alters how options can be used, as it makes use of bash's `getopts` which is limited to single character options. Portable, but limited compared to the separate `getopt` program.