Fix broken tests by moving references from "tests" to "test"

The "tests" folder was recently moved to "test", but data files were
not updated. Several tests reference data files such as certificates
and other fixtures. Test files also reference each other in a way that
was broken.

This patch changes all data and test file references to reflect the
new directory structure.

Some style fixes are also included.
Changed line endings for consistency with other files.