Fixed where the 'temp_directory' const pointed to.