One trick I sometimes use for debugging things like this is to view the page in question in a browser, then right-click and get the source to see what directory it is pointing to. You might find that the ~ is not returning the path you expect it to return. You could also do a messagebox or document.write to check the path.
I am pretty new to this control too, so I am kind of just shooting in the dark, but I ran into some of the same problems. However I am really not familiar with DotNetNuke, so that may be the problem.
When do you get the security warning? What does it say? Do you still see the page in question or it is a .net error page?
Aside from checking that the path is right, are you certain that the folders are at those locations?
Also, do you have the .lic file in the bin directory?