Continuing ajax upload

Ensured the files are written to a temporary directory and details of
the files sent in the $_POST variable. Next, attach the files to the
email, move files to a permanent location, delete temporary files and
check for orphaned files and delete if found