Bug 924142 - Safely handle empty sshkey files

Use IO.read instead of file.gets (which can return nil), ensure that all unit
tests are stubbing IO.read properly (which FakeFS does not do by default)