Fixed issue for creating file at correct position

Problem: Creating a new file by right clicking a non-root folder creates
the file as its sibling instead of its child.