C module: Handle more cases with spaces in paths