Added factorial() method

Tried run_tests.sh #30