BUG: backport fromfile and large file fixes to 1.8

Changes from gh-4152, gh-4165, gh-4187, gh-4196
TST: backport travis test improvements to 1.8

adds 32 bit and debug tests.
Merge pull request #4214 from juliantaylor/fromfile-fix-backport-1.8

backport fromfile fix to 1.8