Get path from file object