function [paths,errors]=SanitizePaths(paths,exts)
    if ~iscell(paths)
        paths={paths};
    end
    if ~iscell(exts)
        exts={exts};
    end
    exts=regexprep(exts,'^\.','');
    errors=false(1,numel(paths));
    for i=1:numel(paths);
        path=paths{i};
        [~,~,e] = fileparts(path);
        %If no extension, try suggestions
        pathWithExt = path;
        if isempty(e)
            for k=1:numel(exts)
                if exist([path,'.',exts{k}],'file')
                    pathWithExt=[path,'.',exts{k}];
                    break;
                end
            end
        end
        [d,f,e] = fileparts(pathWithExt);
        if isempty(d)
            d=pwd;
        end
        if exist(pathWithExt,'file')
            if ~isempty(regexpi(e,sprintf('.%s$|',exts{:}), 'once'))
                %If it exists and it has a good ext, toss on the full path and use it
                pathWithExt=[cd(cd(d)) filesep f e];
                paths{i}=pathWithExt;
            else
                %If it exists but isn't the right file type, add an error
                fprintf('File %s does not appear to be the correct type\n',path);
                errors(i)=true;
            end
        else
            %If it doesn't even exist, add an error
            fprintf('Failed to locate file at %s\n',path);
            errors(i)=true;
        end
    end
end