It appears that R15B01 changed the triggers for when the "Module X must be purged before
loading" error is logged (as compared to R14B04).
As reported here: http://lists.basho.com/pipermail/riak-users_lists.basho.com/2012-July/008828.html
This patch should fix the issue by avoiding the race between the check on is_loaded and the call to load_file.
avoid race to code:load_file by using code:ensure_loaded instead
This should get rid of the spurious messages about "Module X must be purged before