COSMIT: Use linesep only where necessary
FIX: Remove tmp dir on Windows