Revamp of how directories are handling

I'm soon going to be adding in the ability to move between directories (gasp! how advanced), and the current model didn't work well for the memory at all. These changes make it so the contents of current directory (and the current directory) are the only items loaded in the memory at one time.