Changed SD filename generation, made SD handling more reliable as a whole
Properly restart sd prints

Fixes #258
(cherry picked from commit 076c676)
Merge pull request #3 from foosel/master

PR