- added macro to get exit code from status variable
- added O_TRUNC and modes to open() for overwriting existing files when redirecting with >
- changed some tabs to spaces for spacing issues