Adds a check for get_page_by_path().

This function hits the database and so can be costly. Let's warn.