Add spec for IO.pipe and having the same internal and external encoding
Setup pipe with proper default encodings

Fixes #2071