Refactors the permalink validation 

Modified some methods to look prettier and moves the error message to the locale files
Merge pull request #172 from barboza/model_permalink_check

Refactors the permalink validation