Added isdir function to check if a path is a directory. Added BACKSLASH macro (os-specific path separator).