Fixed wrong memset() in scan_directory()