Strip trailing $ from ScalaApplication name

We shouldn't be using it, and it can cause problems if the application
name is ever used in a place where the dollar is a special character
(e.g. a regular expression).