afptool: fix path of destination file

Open destination file before changing directory