Added OS-specific getcwd, mkdir, stat