change catelog variables
add mkdir_p for make parent directory, like linux mkdir -p
refactor get category method for multi level directory