fix package.json test script
rename tests directory to test
add support for initial values in reduce