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