Fixed some issues with directories.