From http://stackoverflow.com/questions/2390789/how-to-replace-all-periods-in-a-string-in-javascript