Iss302

Fix bug where HEAD calls on resources or items causes a server error. Also updated the assertHead call in tests to use the passed url instead of always ``'/'``