Implement get_handle in File and Pipe