Copied PropertiesUtil from NightLabs' codebase.