Added error checking, comments and documentation Now creates and uses temporary directory for each test
Attach a file by drag & drop or click to upload