added page_dir option.