A man who set fire to a fast food outlet in Melbourne accidentally set himself on fire in the process.