Implement nested command substitution with $()