Test for locales/ synchronization

You requested a commit for my Python helper script in pull request #255. I decided that since everything was already in JS, it would be nice to convert the script to JS to include it in tests. I tried to do so. I don't have much experience with JS, so I tried to see what the existing conventions were. If anything's wrong, please tell me.