Bak plugin: fixed directory handling