Change InputStream to CloseShieldInputStream and close locally created buffers after use

Changes to close streams after use in line with comments on issue #7