bak: fixed directory handling
Merge branch 'bak'