Using TemporaryFile instead of mkstemp() and fix several broken tests

Hi, 

Please review my changes.

Note that changes has a collision with https://github.com/paltman/pymediainfo/pull/11. I think PR https://github.com/paltman/pymediainfo/pull/11 is more likely, but you decide.

Also changes fix some test, which had been broken when migration onto beautifulsoap4 was done.

Thanks!