FIX: Hardening File Uploading API to check for file existence

Issue #941: https://code.google.com/p/phantomjs/issues/detail?id=941

While coding this, and running the test, I noticed a small issue with a test not cleaning up correctly after itself, causing other tests to fail. I have "squeezed" in a fix for that: hope you don't mind too much.