add dir and file check
Merge https://github.com/yestinchan/encodingtool