Return errno when fopen fails
Land #90, errno fix for posixterp