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.
Because I wanted to fix it fast and I know C++11 is months away. Also stoi does not provide a version for char, unsigned char or unsigned int. I would be happy to add specializations that map to the standard library for the types it does provide when they are available.