Close tmpfile() in Connection::put

Prevents crashes for scripts issuing high numbers of put requests
Merge pull request #108 from nhedman/master

Close tmpfile() in Connection::put