Fixed a couple of issues in craftingRecipes.cpp

Added a new function for parsing numbers. Its advantages over atoi are that it has bounds checking and can parse any integer type.
You're calling `a_str.size()` on each loop iteration.