FIX: errors running rake db:migrate while creating a table

For your reference the versions I have on my `Gemfile.lock`:

- activerecord (4.1.5)
- pg (0.17.1)
If `table_name` was for example "DimTime" the condition created was something like

```sql
WHERE a.attrelid = '"DimTime."'::regclass -- quotes followed by double-quotes
```

If you run the following Query

```sql
SELECT '"DimTime"'::regclass -- Note: I removed the dot also
```
it returns `ERROR: relation "DimTime" does not exist`

The other issue I had in this function was about the dot that follows the table_name (that is being saved also like that in the `db/schema.rb`), so I ended up doing the following:

```ruby
table_name_with_no_dots, _, _ = table_name.partition('.')
exec_query(<<-SQL, 'SCHEMA').rows
              SELECT -- (...)
               WHERE a.attrelid = '#{table_name_with_no_dots}'::regclass
               -- (...)
          SQL
```