Rabin-karp fully working version, with tests.