lePath $ takeDirectory' p </> "page" </> show n </> takeFileName p
  where takeDirectory' x = let x' = takeDirectory x in if x' == "." then "" else x'

makeEmptyItem :: Monoid a => 
makePageIdentifier p n = fromFilePath $ takeDirectory' p </> "page" </> show n </> takeFileName p
  where takeDirectory' x = let x' = takeDirectory x in if x' == "." then "" else x'
makePageIdentifier p n = fromFilePath $ takeDirectory' p </> "page" </> show n </> takeFileName p
  where takeDirectory' x = let x' = takeDirectory x in if x' == "." then "" else x'