Fix #119 calling 'path' on not IO objects