small code-cleanup: remove sprintf in favor of built in elgg_echo params...

..., remove unused variables, properly return mime in download headers