Add a test for casting integers to IPv4 addresses, then fix the code so the test passes!

Test based development FTW!
Fix parsing of ascend string attributes
Work around const