removed old bash scripts
prevent unclosed file descriptors
added .gitignore
added test for writeLinesTo