collapse os_file_mtime into os_file_open_r and check for directory

This is a manual merge of kristate's pull request #1754, due to
conflicts + a couple fixups.

closes #1754
59c050e7ffAndrew Kelley committed on 1/30/2019, 9:06:18 PMparentad8381e
3 files changedLine totals unavailable