directory mode fixed

directory won't be writable without this change..