Added Java, Python and Perl versions

Also added test samples of lengths up to 100k characters, some in the
FASTA format.