Added check to make sure that editing can only occur from the root dir.