added a hack for windows
maximum length for filenames, also added windows line endings
Removed 'app'
simplified the filenaming
fixed line endings under mac