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