clean up var
handle case where 'app/' is not at beginning of directory