made md_gethomedir a bit faster and a bit more safe
made md_gethomedir a bit faster and a bit more safe

lollek/Misty-Mountains,lollek/Rogue14,lollek/Misty-Mountains,lollek/Misty-Mountains,lollek/Rogue14,lollek/Rogue14