Start refactoring popen module to osstream module.
Finish refactoring popen to osstream module, add fdopen stream object.