core: Move mkdir_recursive from rustpkg into core::os

r? @brson mkdir_recursive creates a directory as well as any of its
parent directories that don't exist already. Seems like a useful
thing to have in core.