Added check in initialize function to ensure that indir and outdir end w...

Added check in initialize function to ensure that indir and outdir end with slash