Added some more cmdmod unittests

Also changed a little bit of the umask logic: If `umask=0` kwarg was set, the `if umask` statement was never entered. Also, the first `ValueError` in the original "Zero umask is not allowed" was getting skipped over in favor of the `CommandExecutionError` in the `except` statement. This should be fixed now and has corresponding tests.