Tidied perimeter length function.

print statement in for block now reports correct rectangle dimensions.