Fixed a crash when pages directory is absent.