Added unittest for buildCmdArgs()