fixed readdir and package bin requirement