Updated append() function, got / added to filename successfully, fixed uid and gid weirdness.