Resolve path for file objects as well