Publishing pages - fixed minor bug when setting title and created unit test to cover that g...

...litch.