Depths and Stanley depths of path ideals of spines