Added support for the ~ and ^ operators
Fixed offset parsing bugs in magic.py