Fix wrong directory path in document file output (#957)