Expand given file path before changing directories

Otherwise when the path given for backup/restore is relative,
it is being resolved to /, which is unexpected for the user.