Fix saving EPS to open file objects on Python 2.x

Fix issue #470 and #479