Fix check mandatory fields.

According to the [Transifex project API](http://support.transifex.com/customer/portal/articles/1009473-project-api) a `repository_url` is mandatory for projects using the license "code"  `permissive_open_source` or `other_open_source`

This will add a check to avoid any unnecessary requests to Transifex.

Also: Some refactoring