Fix to recursive mkdir to ensure that absolute paths as well as relative paths work correctly