Use mkdir.sync.
Filter out directories from pages.