# Functions
dirAvail ensures directory dir exists.
dirWriteable checks whether directory dir is writeable
A temporary file is created under the directory path and removed immediately following this check.
pathDirectoryLike: whether path attempts to specify a directory
A directory is specified via a trailing path separator slash.