Added tests for windows access checking, and minor changes due to tests.

The two access functions for windows are now tested, and some changes were
made to the interface and behavior as a result of testing. Some existing
tests were modified to reflect the new behavior.