Moved config out of main script. Wrapped copyto into a function. Altered create_temp_path to be easier to modify.