FIX: 1. mkboot output file closure issue
2. rm_links.sh does not clean all links

mkboot exits without closing output file if input file open fails.
Modified to open the output file post input file handle check and error handling.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
FIX: Bit 16 in CR0 needs to be set to inhibit superviser mode write access to user mode read-only pages.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
Merge pull request #3 from jarun/dev

FIX: mkboot output file closure and link deletion in rm_links.sh issues
Fixes a bug in memory allocation test code.
Fixes a bug in page_free. We want signed integer comparisons.