Fixed error in dialogue import/export
Ported dialogue and IO to nio API to support file-locks