Don't lose commodity when cost is not separated by whitespace

When a cost was specified without a whitespace after the @ symbol,
as in @$5.01, this was incorrectly parsed as 5.01 (losing the
commodity) rather than $5.01.

Bug fix for #1050