small fix for makeFriendlyName() 

When the name finished with a cap it raised an exception.