Updated the editpage functionality so it works on subdirectories again.