Use self instead of NSFileManager and properly handle getResourceValue error case
Added error domain check. Thanks @quellish!