[Reviewer: Alex] Collect hprof files

Alex, I've moved the hprof collection as you suggested - this is the new pull request for it. 
Fixes #78 
(I've also added getting the /etc/hosts file, and renaming sockets.txt > netstat.txt)
If there are no hprof files this will cause `wait_until_closed` to hang.