Updated correctbarcodes.py to work with any length of barcodes and
made the maximum acceptable distance configurable.