fixed bug in appending DirectoryPage
merge DirPageGen