Move temporary file inside the app directory

This needs to be changed to a File object passed in.