Resource: Ensure location path is string

Ensure the location's path is an encoded str, so that it will compare
properly with the incoming path.
Logging: Use %s instead of .format

Using .format errors if the strings mix str and unicode. Switch to %s
because it avoids this problem.  Python3's logging module supports %s as
well.