Escape directory names in shell commands.