no need for -p argument to mkdir
refactor compression handling
make dbdump function adhere to style guide