Updating parent dir logic if located within node_modules