function packageDirectories( contents ) {
		var content;
		var out;
		var i;

		out = [];
		for ( i = 0; i < contents.length; i++ ) {
			content = contents[ i ];
			if (
				isDirectory( join( dir, content ) ) &&
				!contains( excludes, content )
			) {
				out.push( content );
			}
		}
		return out;
	}
Filters out any non-package directories from a list of directory contents.

@private
@param {Array} contents - directory contents
@returns {Array} namespace package directories