function to change cur_directory

all of the directory functions are "done", they need to be updated to
fit inside of the memory we are using and update the table