Makes timelapse.sh write to temporary files first then move them to avoid access to files that are currently being written