Parse Fix

Fixed an obscure CLI argument parsing bug, and made some tests to prevent regression. This is ready to merge, but feel free to give it a double-check.