clean up port to pass portlint and rclint

- Never write your own routine for UID and GID creation/checking;
  ports framework has that built-in
- Lots of style/conformance fixes in the rc script