Adds newline stripping in markov_init

Markov chains are now correctly terminated.
Moves LDFLAGS to end of compile command

ld no longer complains about missing libraries.