–If either above condition is not met, then the script should exit with an appropriate message
You will (probably) need to make use of the following cmdlets:
ØHas a –PathType parameter which will help you verify a path is a directory
ØHas a –File parameter which will cause it only to return files (and not directories)