Add missing flags for open.
Always shift first argument.