fix reference to resources directory via switchToResourcesParentIfRequired