fix #1236 by opening the parent directory of last used document