Replace faulty strupr() implementation.
Prevent segfault caused by stub string.
Set arbitrary heap size for memory handler.
Slightly improve text output.