Improve getting the uploaded filename.

Firefox doesn't have "fakepath," so upload failed there.
Merge pull request #6 from Benxamin/patch-2

Improve getting the uploaded filename.