Fix bug for absolute loader basedirs

Also tidy up variable casing.