Reconstruct commandline.

A more clean parse of commandline.
Merge pull request #6 from daniel-star/reconstruct-commandline

Reconstruct commandline.