handle dir

-- test2main/index.html --
<!DOCTYPE html>
<html>

-- test2pkg/index.html --
<!DOCTYPE html>
<html>

-- test2pkg/pkg/index.html --
<!DOCTYPE html>
<html>

-- test2PKG/index.html --
<!DOCTYPE html>
<html>

-- test2PKG/p1/index.html --
<!DOCTYPE html>
<html>

-- test2PKG/pkg/index.html --
<!DOCTYPE html>
<html>

