Implemenation of 'ex' API - portable os and io extension functions