Fix directory check error, fix printing error

`dirIsValid` returned `undefined` if directory exists and this caused "--css path provided is not a directory." message to be printed. Also `print()` function was not defined. Used `console.log` instead.