TypeScript : Path manipulation