From http://axialcorps.com/2013/09/27/dont-slurp-how-to-read-files-in-python/