NodeJS utility to recursively flatten directories with images in them