Strip weird characters from links and filenames. Add util function to do this.