Another approach that might be worth considering is using a StringBuilder.  All of the joins as well as the ArrayList involves a lot of extra allocation.  But since this is for CLI tools, it's unlikely to actually matter.