Added functionality to create a tmp directory within files/ if it does not
already exist.