fixed newline problem on windows (reported by Igor)
added tests
changed package