Fix temp_dir problem, and uploadPhoto problem.

Hi dgrant,

I tried to use eyefiserver2 with iOS Eye-Fi App,
and I encountered 2 problems.

I fixed these problems.
(Please see the commit comment.)

Thanks.