 {EOL} = require 'os'
 Readline = require 'readline'
-{readFileSync, createReadStream, createWriteStream} = require 'fs'
+{readFileSync, createReadStream, createWriteStream, statSync} = require 'fs'
 {Writable} = require 'stream'
 Path = require 'path'
 

		ensureStream dest, defaultEncoding: @encoding, (stream, end) =>
			@findConcats (concats) =>
				error = null
				concats = mapConcats(concats, newRelative, this) if recursive
				paths = [concats.prepend..., @source, concats.append...]
				joinFiles paths, @encoding, stream, options, -> callback?(error)


		commenter = CodeCat.Commenters[ext]
		if commenter? then regexpEscape(commenter) else ''
	
	mapRelative = (source) ->
		stats =
			try
				statSync getRelativePath(@source, source)
			catch
				null
		if stats?.isFile()
			new @Relative(source)
		# else if stats?.isDirectory()
		else
			try
				require.resolve(source)
			catch
				console.error("Invalid file or node module \"#{source}\"")
				null

	joinFiles = (files, encoding, stream, options = {}, finishedFn) ->
		{separator = EOL} = options
