It will only break keys of length up to and including 12. The program works reliable for text length of 150 characters and bigger.
Lengthy texts slow the program down, though.
The key using the encoding below and the most likely plaintext are printed to stdout. The ciphertext-file is an ascii file. Only lowercase letters, space, and newline may used. Newlines are ignored, though. It is expected that words are separated by a word separator character that might be different from space.