added greyscale
added greyscale support; tested and it works
fixed directory handling