Fixed a page breaking bug

is_dir <> is_file...