Make params parse more robust for key:value pairs

I just stumbled across this code while playing around with the command line arguments.

Might be good to have it, not sure though :-)

It's here so that it won't get lost