fix some bugs causing appender to create zillions of empty files
Merge pull request #3 from dustismo/master

bug fixes in new appender