add detelteDir function and fix bug
coding style
add phpunit