Added permutation testing.

Also fixed the asymptotic p-value calculation which was reporting
slightly higher p-values than expected.
Merge branch 'master' of github.com:arq5x/gemini