function getCallback( idx, spath, dir ) {
		return onExists;

		/**
		* Callback invoked after checking for path existence.
		*
		* @private
		* @param {(Error|null)} error - error object
		* @param {boolean} bool - boolean indicating if a path exists
		* @returns {void}
		*/
		function onExists( error, bool ) { // eslint-disable-line node/handle-callback-err
			if ( bool ) {
				out[ idx ] = spath;
				return next();
			}
			// Resolve a parent directory:
			child = dir;
			dir = resolve( dir, '..' );

			// If we have already reached root, we cannot resolve any higher directories...
			if ( child === dir ) {
				out[ idx ] = null;
				return next();
			}
			// Resolve path at next directory level:
			spath = resolve( dir, paths[ idx ] );
			exists( spath, getCallback( idx, spath, dir ) );
		}
	}
Returns a callback to be invoked upon checking for path existence.

@private
@param {NonNegativeInteger} idx - index
@param {string} spath - resolved path
@param {string} dir - base directory
@returns {Callback} callback