Added more image processing options, better tests using VFS stream, cleaned up empty_directory funcdtion.