Revert "Revert "Print a proper error on invalid option arguments.""

This reverts commit cf0b5a226acfe819d3d8b74e8a47b82b05a9545c.
Parse options in a backwards-compatible way.

Revert this once we switch to a newer Elixir.