Escapes paths in target() function