Include directories in the tar stream if included in the source stream.

The standard tar process does this, so I built some other software around this.

The first check makes sure we don't try and tar the root folder.
there's no reason to replace here since you're comparing to an empty string

also `===`