Implement File rebase(). Fix #643