Fix busted rake db, and busted msfconsole when it's a symlink

Fixes two, count 'em *two*, msfconsole crashes.  This is a better fix for #3673.