Implement and test ucfirst().
Guard against infinite loop in wrap().

Closes #5.