generator.py:added support for directories in FILES_TO_COPY and minor fix for log.py