fix path resolution for nested npm packages