Close loading dialog when error during startup
Fix crash at startup in some instances

Use M_StringCopy() instead of strcpy(). Also make other tweaks to
W_AddFile().
Further changes to loading dialog