/// <summary>
        /// Returns a 'rooted' sink for the provided one if the sink happens to be a file.
        /// </summary>
        /// <param name="sink">The sink to root.</param>
        /// <returns>The rooted sink.</returns>
        protected Sink GetRootedSink(Sink sink)
        {
            if ((sink == Sink.StandardOutput) || (sink == Sink.StandardError))
            {
                return sink;
            }

            return (sink == null ? null : Sink.File(GetRootedPath(sink.ToString())));
        }
        /// <summary>
        /// Returns the associated output file for the provided sink.
        /// </summary>
        /// <param name="sink">The output sink.</param>
        /// <returns>The file associated to the provided sink.</returns>
        protected string GetFile(Sink sink)
        {
            if (sink == Sink.StandardOutput)
            {
                return StandardOutFile;
            }
            else if (sink == Sink.StandardError)
            {
                return StandardErrorFile;
            }

            return (sink == null) ? null : GetRootedPath(sink.ToString());
        }