Properly handle situations when the parent directory of a created or modified file doesn't exist