I think the provided track data is supposed to be in (something like) PC/DOS 8-sector format. Having more sectors in the returned track data (e.g. the usual 9) wouldn't hurt.
amiga.c in the file selector source could help, see the writesector() and readsector() functions.