complain if the build dir is in the source dir as that doesn't work for some reason

close #476
make all OptimizerStates periodic as they mostly are anyway

close #466