Provide error message on invalid command to emmake.

Previously, this would just throw an exception, now it provides
a reasonable error message.
emcc: Improve handling of -O flag.

Previously, while gcc supports -O, emcc would fail. It now interprets
-O as -O2, just as gcc does.

Additionally, it was only looking at the first character after -O, so
nonsense like -O34 would be accepted (and treated as -O3).
Merge pull request #859 from waywardmonkeys/cmdline-fixes

Cmdline fixes