Add a replacement InputStream reader (for testing)

Also includes unit testing.