Correct timeout parsing in cmdline

Also add a test for this functionality