Bug fix in link script
add lib
add make directories script (only var atm)