Cts prjfixes

Fix a bug in PrjWriter and another in CRSFactory. Add Javadocs and improve the management of exceptions.