Fix check vimperator directory function